//
//  MyHomeViewController.m
//  wsgz
//
//  Created by huck on 2017/5/4.
//  Copyright © 2017年 BoingPay. All rights reserved.
//

#import "MyHomeViewController.h"
#import "AppUtils.h"
#import "BannerView.h"
#import "XGWebViewController.h"
#import "WaterSearchViewController.h"
#import "MainViewController.h"

@interface MyHomeViewController ()

@end

@implementation MyHomeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self initSubview];
}

-(void)initSubview
{
    [BannerView bannerViewWithFrameView:_bannerViewFrame];
}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
}

-(void)selectorUserLogin
{
    [Toast makeText:@"检测登陆"];
}

- (IBAction)waterTypeInfoClick:(UIButton *)sender
{
    NSString* path = [[NSBundle mainBundle] pathForResource:@"water" ofType:@"html"];
    NSURL* url = [NSURL fileURLWithPath:path];
    XGWebViewController *web = [[XGWebViewController alloc] init];
    web.url = url.absoluteString;
    web.hideRightButton = YES;
    [[AppUtils getNavigationController] pushViewController:web animated:YES];
}

- (IBAction)waterInfoClick:(UIButton *)sender
{
    WaterSearchViewController *search = [[WaterSearchViewController alloc] init];
    [self.navigationController pushViewController:search animated:YES];
}

- (IBAction)superviewClick:(UIButton *)sender {
    [[AppUtils getmainViewController] userSelectTab:TabBarItemTypeSupervise];
}
@end
